<?php echo $header; ?>

<!-- Tool tip -->
<script type="text/javascript" src="catalog/view/theme/<?php echo $template; ?>/js/easyTooltip.js"></script>
<script type="text/javascript">
	jQuery(document).ready(function(){	
		jQuery("a").easyTooltip();
		jQuery("a#link").easyTooltip({
			tooltipId: "easyTooltip2",
			content: '&nbsp;'
		});
	});
</script>
<!-- End Tooltip -->

<!-- Content -->
	<div id="main" class="p13t">
		<?php echo $column_left; ?>
    
    	<div id="col2" class="w709">
        	<div class="box_tt">
            	<h4 class="p5t">Kontakt os</h4>
          	</div>
          	<div class="box_content_underpage">
          		<form id="contact" name="contact" action="<?php echo str_replace('&', '&amp;', $action); ?>" method="post">
            		<div class="box_content_underpage1 min_heght">
              			<p class="p10t p15r p15b p20l"><?php echo $contact_text; ?></p>
              			<div class="form_levering p17t p12r p17l boder_bt_dot p15b">                          
              				<div class="line_right_contact float_left">
              					<!--div id="contact_error" class="errorForm"></div-->
              					<label>Navn:</label>
              					<input class="txt_levering w270 required" id="name" name="name" type="text" />              					
                 				<br class="cb" />
                  				<label>Email:</label>
                  				<input class="txt_levering w270 required email" id="email" name="email" type="text" />                  				
                 				<br class="cb" />
                  				<label>Telefon-nr:</label>
                  				<input class="txt_levering w270 required telephone" id="telephone" name="telephone" type="text" />
                  				<br class="cb" />
                  				<label>Emne:</label>
                  				<input class="txt_levering w270" id="subject" name="subject" type="text" />                  				
                  				<br class="cb" />
                				<label>Din besked:</label>
                				<textarea class="w270" id="enquiry" name="enquiry"></textarea>                   				
                				<br class="cb" />
                				<label>&nbsp;</label>                	
                				<input type="submit" style="background:url(catalog/view/theme/<?php echo $template; ?>/images/bt_send.png);width:67px;height:26px;border:0px;cursor: pointer;" value="" />
              					<input type="reset" style="background:url(catalog/view/theme/<?php echo $template; ?>/images/bt_nulstil.png);width:67px;height:26px;border:0px;cursor: pointer;" value="" />
                			</div>              			
              			    <div class="float_left p20l">
              				    <p class="boder_bt_dot p15b"><img src="catalog/view/theme/<?php echo $template; ?>/images/logo_mini1.png"/></p>
								<p class="p13t">
									<?php echo $contact_address ?><br />
                    		        Tlf.: <?php echo $contact_telephone ?><br />
                    		        Fax: <?php echo $contact_fax ?><br />
                    		        E-mail: <a href="mailto:<?php echo $contact_email; ?>"><?php echo $contact_email; ?></a>
                                </p>
              				    <!--
								<p class="p13t"> Ndr. Havnevej 9<br />
                    		        3250 Gilleleje<br />
                    		        SE-nr. 14 11 80 04<br />
                    		        Tlf.: 48 30 16 99<br />
                    		        Fax 48 30 39 69<br />
                    		        E-mail: <a href="mailto:<?php echo $contact_email; ?>"><?php echo $contact_email; ?></a>
                                </p>
								-->
                                <!--
                    		    <p class="p15t"><a id="link" href="javascript:void(0);"><img src="catalog/view/theme/<?php echo $template; ?>/images/bt_findosher.png"/></a></p>
                                -->
                		    </div>
              			    <p class="cb"></p>
                        </div>
                        <div class="p15" style="position: relative; overflow: hidden; height: 380px;">                            
                            <iframe style="border:1px solid #999; position: absolute; z-index: 9999; top: 15px; left: 15px;" width="678" height="380" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Nordre+Havnevej+9,+3250+Gilleleje,+Denmark&amp;aq=0&amp;sll=56.125682,12.307484&amp;sspn=0.009066,0.01929&amp;g=Ndr.+Havnevej+9,+3250+Gilleleje,+Denmark&amp;ie=UTF8&amp;hq=&amp;hnear=Nordre+Havnevej+9,+3250+Gilleleje,+Denmark&amp;ll=56.125677,12.307477&amp;spn=0.009066,0.01929&amp;z=14&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=Nordre+Havnevej+9,+3250+Gilleleje,+Denmark&amp;aq=0&amp;sll=56.125682,12.307484&amp;sspn=0.009066,0.01929&amp;g=Ndr.+Havnevej+9,+3250+Gilleleje,+Denmark&amp;ie=UTF8&amp;hq=&amp;hnear=Nordre+Havnevej+9,+3250+Gilleleje,+Denmark&amp;ll=56.125677,12.307477&amp;spn=0.009066,0.01929&amp;z=14" style="color:#0000FF;text-align:left"></a></small>
                        </div>
            		</div>           		
          			<div class="box_bottom"></div>
         		</form>
        	</div>
        	<p class="cb"></p>
      	</div>
		<p class="cb"></p>
	</div>
</div>   	
<!-- End content -->
    
<!-- footer -->
<?php echo $footer; ?>     	

<script language="javascript"><!-- 
	// Validate form
	//var mail_filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 
	var mail_filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z]{2,6})+$/;
	var numeric_filter = /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)|(^-?\d*$)/;
	var error = true;
	
	function checkRequired(element){  
		error = jQuery(element).val() == ''; 
		if(!error){
			if(jQuery(element).hasClass('email')){
				error = !mail_filter.test(jQuery(element).val());
			}
			
			if(jQuery(element).hasClass('telephone')){
				error = (jQuery(element).val().length < 6) || !numeric_filter.test(jQuery(element).val());	
			}
			
			if(jQuery(this).hasClass('postcode')){
				error = (jQuery(element).val().length != 4) || !numeric_filter.test(jQuery(element).val());
			}
		}
		
		if(error){
			if(!jQuery(element).hasClass('errorField')){
				jQuery(element).addClass('errorField');
			}			
			
			//jQuery('#contact_error').html('<h3>Error</h3>');
			//jQuery('#contact_error').show();	
		}
		else{
			if(jQuery(element).hasClass('errorField')){
				jQuery(element).removeClass('errorField');
			}	
			
			//jQuery('#contact_error').hide();		
		}
	}
	
	jQuery('#contact input.required').blur(function(){
		checkRequired(this);
	});    	
	
	jQuery('#contact input[type=reset]').click(function(){
		jQuery('#contact input.required').each(function(){
			if(jQuery(this).hasClass('errorField')){
				jQuery(this).removeClass('errorField');
			}			
		});
		//jQuery('#contact_error').hide();	
	});
	
	jQuery('#contact').submit(function(even){
		jQuery('#contact input.required').each(function(){
			checkRequired(this);
		}); 		
		
		return !error;
	});
//-->
</script>